set(TARGET_NAME ${PROJECT_NAME}-test)

set(SOURCES dummy.cpp main.cpp)

add_executable(${TARGET_NAME} ${SOURCES})

target_link_libraries(${TARGET_NAME} PRIVATE roq-client::roq-client roq-logging::roq-logging
                                             Catch2::Catch2 ${RT_LIBRARIES})

if(ROQ_BUILD_TYPE STREQUAL "Release")
  set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS_RELEASE -s)
endif()

if(APPLE)
  target_compile_definitions(${TARGET_NAME} PRIVATE FMT_USE_NONTYPE_TEMPLATE_ARGS=1)
endif()

add_test(NAME ${TARGET_NAME} COMMAND ${TARGET_NAME})
